package com.demo.design.behavioral.chain.impl;

import com.demo.design.behavioral.chain.Handler;

public class ApparentPowerHandler implements Handler {
    private Handler handler;

    @Override
    public Handler setNext(Handler handler) {
        this.handler = handler;
        return handler;
    }

    @Override
    public void operate() {
        System.err.println("视在功率解析完成");
        if (handler != null) {
            handler.operate();
        }
    }
}
